<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TYCamport3: TYImageProc.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TYCamport3
   &#160;<span id="projectnumber">3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('a00008_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TYImageProc.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00008.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#ifndef TY_IMAGE_PROC_H_</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#define TY_IMAGE_PROC_H_</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00002.html">TYApi.h</a>&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00005.html">TYCoordinateMapper.h</a>&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00011.html">TyIsp.h</a>&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;TY_CAPI <a class="code" href="a00008.html#a74321e8b166042ece04746cc88ab038e">TYImageProcesAcceEnable</a>(<span class="keywordtype">bool</span> en);</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;TY_CAPI <a class="code" href="a00008.html#a1b464bbb119959e19acce5e0e96160f9">TYUndistortImage</a> (<span class="keyword">const</span> <a class="code" href="a00077.html">TY_CAMERA_CALIB_INFO</a> *srcCalibInfo</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        , <span class="keyword">const</span> <a class="code" href="a00153.html">TY_IMAGE_DATA</a> *srcImage</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        , <span class="keyword">const</span> <a class="code" href="a00065.html">TY_CAMERA_INTRINSIC</a> *cameraNewIntrinsic</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        , <a class="code" href="a00153.html">TY_IMAGE_DATA</a> *dstImage</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        );</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">// -----------------------------------------------------------</span></div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="a00181.html">   34</a></span>&#160;<span class="keyword">struct </span><a class="code" href="a00181.html">DepthSpeckleFilterParameters</a> {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordtype">int</span> max_speckle_size; <span class="comment">// blob size smaller than this will be removed</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordtype">int</span> max_speckle_diff; <span class="comment">// Maximum difference between neighbor disparity pixels</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;};</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#define DepthSpeckleFilterParameters_Initializer {150, 64}</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;TY_CAPI <a class="code" href="a00008.html#a797c07c57a28e7903725dd41963957d4">TYDepthSpeckleFilter</a> (<a class="code" href="a00153.html">TY_IMAGE_DATA</a>* depthImage</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        , <span class="keyword">const</span> <a class="code" href="a00181.html">DepthSpeckleFilterParameters</a>* param</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        );</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment">// -----------------------------------------------------------</span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="a00185.html">   54</a></span>&#160;<span class="keyword">struct </span><a class="code" href="a00185.html">DepthEnhenceParameters</a>{</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="a00185.html#a005d6e28cca77a5964b0c588ee3839e9">   55</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="a00185.html#a005d6e28cca77a5964b0c588ee3839e9">sigma_s</a>;          </div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="a00185.html#a307c0f2750006519986ede18f461a33f">   56</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="a00185.html#a307c0f2750006519986ede18f461a33f">sigma_r</a>;          </div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="a00185.html#ae710febd7b70a95c1ec51e8721cb4d6e">   57</a></span>&#160;    <span class="keywordtype">int</span>   <a class="code" href="a00185.html#ae710febd7b70a95c1ec51e8721cb4d6e">outlier_win_sz</a>;   </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">float</span> outlier_rate;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;};</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#define DepthEnhenceParameters_Initializer {10, 20, 10, 0.1f}</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;TY_CAPI <a class="code" href="a00008.html#af8bb2a45b6fd8b542d250e2cd04e6d53">TYDepthEnhenceFilter</a> (<span class="keyword">const</span> <a class="code" href="a00153.html">TY_IMAGE_DATA</a>* depthImages</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        , <span class="keywordtype">int</span> imageNum</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        , <a class="code" href="a00153.html">TY_IMAGE_DATA</a> *guide</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        , <a class="code" href="a00153.html">TY_IMAGE_DATA</a> *output</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        , <span class="keyword">const</span> <a class="code" href="a00185.html">DepthEnhenceParameters</a>* param</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        );</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="a00008_html_a74321e8b166042ece04746cc88ab038e"><div class="ttname"><a href="a00008.html#a74321e8b166042ece04746cc88ab038e">TYImageProcesAcceEnable</a></div><div class="ttdeci">TY_CAPI TYImageProcesAcceEnable(bool en)</div><div class="ttdoc">Image processing acceleration switch. </div></div>
<div class="ttc" id="a00185_html_a005d6e28cca77a5964b0c588ee3839e9"><div class="ttname"><a href="a00185.html#a005d6e28cca77a5964b0c588ee3839e9">DepthEnhenceParameters::sigma_s</a></div><div class="ttdeci">float sigma_s</div><div class="ttdoc">filter param on space </div><div class="ttdef"><b>Definition:</b> <a href="a00008_source.html#l00055">TYImageProc.h:55</a></div></div>
<div class="ttc" id="a00181_html"><div class="ttname"><a href="a00181.html">DepthSpeckleFilterParameters</a></div><div class="ttdoc">default parameter value definition </div><div class="ttdef"><b>Definition:</b> <a href="a00008_source.html#l00034">TYImageProc.h:34</a></div></div>
<div class="ttc" id="a00185_html_a307c0f2750006519986ede18f461a33f"><div class="ttname"><a href="a00185.html#a307c0f2750006519986ede18f461a33f">DepthEnhenceParameters::sigma_r</a></div><div class="ttdeci">float sigma_r</div><div class="ttdoc">filter param on range </div><div class="ttdef"><b>Definition:</b> <a href="a00008_source.html#l00056">TYImageProc.h:56</a></div></div>
<div class="ttc" id="a00005_html"><div class="ttname"><a href="a00005.html">TYCoordinateMapper.h</a></div><div class="ttdoc">Coordinate Conversion API. </div></div>
<div class="ttc" id="a00185_html_ae710febd7b70a95c1ec51e8721cb4d6e"><div class="ttname"><a href="a00185.html#ae710febd7b70a95c1ec51e8721cb4d6e">DepthEnhenceParameters::outlier_win_sz</a></div><div class="ttdeci">int outlier_win_sz</div><div class="ttdoc">outlier filter windows ize </div><div class="ttdef"><b>Definition:</b> <a href="a00008_source.html#l00057">TYImageProc.h:57</a></div></div>
<div class="ttc" id="a00008_html_a797c07c57a28e7903725dd41963957d4"><div class="ttname"><a href="a00008.html#a797c07c57a28e7903725dd41963957d4">TYDepthSpeckleFilter</a></div><div class="ttdeci">TY_CAPI TYDepthSpeckleFilter(TY_IMAGE_DATA *depthImage, const DepthSpeckleFilterParameters *param)</div><div class="ttdoc">Remove speckles on depth image. </div></div>
<div class="ttc" id="a00008_html_af8bb2a45b6fd8b542d250e2cd04e6d53"><div class="ttname"><a href="a00008.html#af8bb2a45b6fd8b542d250e2cd04e6d53">TYDepthEnhenceFilter</a></div><div class="ttdeci">TY_CAPI TYDepthEnhenceFilter(const TY_IMAGE_DATA *depthImages, int imageNum, TY_IMAGE_DATA *guide, TY_IMAGE_DATA *output, const DepthEnhenceParameters *param)</div><div class="ttdoc">Remove speckles on depth image. </div></div>
<div class="ttc" id="a00011_html"><div class="ttname"><a href="a00011.html">TyIsp.h</a></div></div>
<div class="ttc" id="a00077_html"><div class="ttname"><a href="a00077.html">TY_CAMERA_CALIB_INFO</a></div><div class="ttdef"><b>Definition:</b> <a href="a00002_source.html#l00684">TYApi.h:684</a></div></div>
<div class="ttc" id="a00065_html"><div class="ttname"><a href="a00065.html">TY_CAMERA_INTRINSIC</a></div><div class="ttdef"><b>Definition:</b> <a href="a00002_source.html#l00658">TYApi.h:658</a></div></div>
<div class="ttc" id="a00153_html"><div class="ttname"><a href="a00153.html">TY_IMAGE_DATA</a></div><div class="ttdef"><b>Definition:</b> <a href="a00002_source.html#l00862">TYApi.h:862</a></div></div>
<div class="ttc" id="a00002_html"><div class="ttname"><a href="a00002.html">TYApi.h</a></div><div class="ttdoc">TYApi.h includes camera control and data receiving interface, which supports configuration for image ...</div></div>
<div class="ttc" id="a00008_html_a1b464bbb119959e19acce5e0e96160f9"><div class="ttname"><a href="a00008.html#a1b464bbb119959e19acce5e0e96160f9">TYUndistortImage</a></div><div class="ttdeci">TY_CAPI TYUndistortImage(const TY_CAMERA_CALIB_INFO *srcCalibInfo, const TY_IMAGE_DATA *srcImage, const TY_CAMERA_INTRINSIC *cameraNewIntrinsic, TY_IMAGE_DATA *dstImage)</div><div class="ttdoc">Do image undistortion, only support TY_PIXEL_FORMAT_MONO ,TY_PIXEL_FORMAT_RGB,TY_PIXEL_FORMAT_BGR. </div></div>
<div class="ttc" id="a00185_html"><div class="ttname"><a href="a00185.html">DepthEnhenceParameters</a></div><div class="ttdoc">default parameter value definition </div><div class="ttdef"><b>Definition:</b> <a href="a00008_source.html#l00054">TYImageProc.h:54</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="a00008.html">TYImageProc.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
